//
//  MineTableViewCell.m
//  Protect -A
//
//  Created by 付剑英 on 16/6/24.
//  Copyright © 2016年 付剑英. All rights reserved.
//

#import "MineTableViewCell.h"
#import <Masonry.h>
@implementation MineTableViewCell
#pragma mark - ------------ 内存管理 ---------------
-(void)dealloc{
    
    [_img release];
    [_labelName release];
    [super dealloc];

}
#pragma mark - ------------ 初始化 ---------------

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubViews];
    }
    return self;
}
#pragma mark - ------------ 创建 ---------------

-(void)createSubViews{
    
    self.labelName  = [[baseLabel alloc]init];
    [self.contentView addSubview:self.labelName];
    
    self.img  = [[baseImageView alloc]init];
    [self.contentView addSubview:self.img];
    
//    self.labelName.backgroundColor = [UIColor yellowColor];
//    self.img.backgroundColor = [UIColor redColor];
    
    [_labelName release];
    [_img release];
    
}
#pragma mark - ------------ 布局 ---------------


-(void)layoutSubviews{
  
    [super layoutSubviews];
    
    [self.img mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(5);
        make.left.mas_equalTo(5);
        make.width.mas_equalTo(30);
        make.height.mas_equalTo(self.contentView.bounds.size.height -10 );
    }];
    
    [self.labelName mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.contentView).offset(0);
        make.left.mas_equalTo(self.contentView).offset(50);
        make.width.mas_equalTo(100);
        make.height.mas_equalTo(self.contentView.bounds.size.height);

    }];
    
    
    
    



}

@end
